import os
import sys

import matplotlib.pyplot as plt

project_dir = os.path.join(__file__, "../../..")
sys.path.append(project_dir)

from cion.emccd.camera import EmccdCamera
from cion.emccd.capturing import capture_image

# conf

dll_file_path = "<fake>"
# dll_file_path = os.path.join(project_dir, "cion/emccd/atmcd64d.dll")

#  run

if __name__ == '__main__':
    with EmccdCamera.from_path(dll_file_path) as camera:
        image = capture_image(camera, exposure_time=0.001)
        plt.imshow(image)
        plt.show()
